#!/bin/sh

TOOLS_BIN=mkfs.jffs2
IN_DIR=$1
JFFS2_NAME=$2

ECHO()
{
	echo -e "\033[32m$1\033[0m"
}

usage()
{
	echo "###############################################"
	echo ""
	echo "   Usage:"
	echo "   	$0 [in_dir] [jffs2_name]"
	echo ""
	echo "###############################################"
}

if [ -z $1 ]; then
	usage
	exit 0
fi

#./${TOOLS_BIN} -s 0x1000 -e 0x10000 -d ${IN_DIR} -o ${JFFS2_NAME}
./${TOOLS_BIN} -s 0x1000 -e 0x10000 -p 0x300000 -d ${IN_DIR} -o ${JFFS2_NAME}

ECHO "Generate: ${JFFS2_NAME}"

